home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / InventorTests / Sphere.wwModel / model.eve
Encoding:
Text File  |  1995-04-18  |  811 b   |  45 lines

  1. set sphere(xTranslate) 2
  2. set sphere(yTranslate) 2
  3. set sphere(zTranslate) 2
  4.  
  5. loadControlPanel controls.nib
  6.  
  7. defineClass: colorCube {x y z}  {
  8.  
  9.   Translate 0 0 0
  10.   Color {1 1 1}
  11.   TransformBegin
  12.     Sphere 1 -1 1 360
  13.     Translate 0 $y 0 
  14.     Sphere 1 -1 1 360
  15.   TransformEnd
  16.  
  17.   Translate $x 0 0 
  18.   Color {1 0 0}
  19.   TransformBegin
  20.     Sphere 1 -1 1 360
  21.     Translate 0 $y 0 
  22.     Sphere 1 -1 1 360
  23.   TransformEnd
  24.  
  25.   Translate 0 0 $z 
  26.   Color {0 1 0}
  27.   TransformBegin
  28.     Sphere 1 -1 1 360
  29.     Translate 0 $y 0 
  30.     Sphere 1 -1 1 360
  31.   TransformEnd
  32.  
  33.   Translate [expr {-1 * $x}] 0 0  
  34.   Color {0 0 1}
  35.   TransformBegin
  36.     Sphere 1 -1 1 360
  37.     Translate 0 $y 0 
  38.     Sphere 1 -1 1 360
  39.   TransformEnd
  40. }
  41.  
  42. startShape aSphere
  43.   animatable: {colorCube $sphere(xTranslate) $sphere(yTranslate) $sphere(zTranslate)}
  44. endShape
  45.